using System;
using System.Collections.Generic;
using System.Text;

namespace SharpMud.MudLib.Common.Resourcing
{
    /// <summary>
    /// Indicates that an object can be uniquely identified by a Guid
    /// </summary>
    public interface IHasInstanceGuid
    {
        IGuidIdentifiedResourceHost Host    { get;}
        Guid                        ID      { get;}
    }

    /// <summary>
    /// Indicates that an object has children objects that can be uniquely identified
    /// by Guids
    /// </summary>
    public interface IGuidIdentifiedResourceHost
    {
        bool    IsDefined(Guid guid);
        object  GetResource(Guid guid);
    }

    /// <summary>
    /// A generic version of IGuidIdentifiedResourceHost that indicates that an object
    /// has specifically-typed children objects that can be uniquely identified by Guids
    /// </summary>
    public interface IGuidIdentifiedResourceHost<TResource> : IGuidIdentifiedResourceHost where TResource : IHasInstanceGuid
    {
        new TResource GetResource(Guid guid);
    }
}
